﻿<div ng-controller="productTokenMakerController">
    <div class="wrapper border-bottom white-bg page-heading">
        <div class="col-lg-pull-12">
            <ol class="breadcrumb">
                <li><a href="javascript:void(0)" ng-click="goBack()">创客商品</a></li>
                <li class="active" ng-bind="breadcrumb"></li>
            </ol>
        </div>
    </div>
    <form name="_form" class="form-horizontal w5c-form" w5c-form-validate="model.validateOptions" role="form" novalidate>
        <div class="form-group">
            <label class="col-sm-3 control-label">销售价</label>
            <div class="col-sm-3">
                <input type="number" name="price" class="form-control input-sm" ng-model="model.price" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">结算价</label>
            <div class="col-sm-3">
                <input type="number" name="cost_price" class="form-control input-sm" ng-model="model.cost_price" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">分销比例</label>
            <div class="col-sm-3">
                <input type="number" name="distribution_rate" class="form-control input-sm" ng-model="model.distribution_rate" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">一级比例</label>
            <div class="col-sm-3">
                <input type="number" name="first_rate" class="form-control input-sm" ng-model="model.first_rate" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">二级比例</label>
            <div class="col-sm-3">
                <input type="number" name="second_rate" class="form-control input-sm" ng-model="model.second_rate" required>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">节点商城比例</label>
            <div class="col-sm-3">
                <input type="number" name="node_mall_rate" class="form-control input-sm" ng-model="model.node_mall_rate" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">超级节点比例</label>
            <div class="col-sm-3">
                <input type="number" name="county_agent_rate" class="form-control input-sm" ng-model="model.county_agent_rate" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">市分公司比例</label>
            <div class="col-sm-3">
                <input type="number" name="city_agent_rate" class="form-control input-sm" ng-model="model.city_agent_rate" required>
            </div>
        </div>
        <div class="form-group form-group-sm">
            <label class="col-sm-3 control-label">状态</label>
            <div class="col-sm-2">
                <select name="status_value" class="form-control input-sm" ng-model="model.status_value" required>
                    <option value="1">上架</option>
                    <option value="2">下架</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">排序</label>
            <div class="col-sm-3">
                <input type="number" name="top" class="form-control input-sm" ng-model="model.top" min="0" step="1" required
                       onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^0-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^0-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"/>
            </div>
        </div>
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label"></label>
            <div class="col-sm-3">
                <button type="submit" w5c-form-submit="save()" class="btn btn-primary btn-sm" btn-loading="psdisabled.save" loading-text="保存中..." ng-disabled="psdisabled.save">
                    <i class="fa fa-save"></i> 保存
                </button>
                <button ng-click="goBack()" class="btn btn-primary btn-sm"><i class="fa fa-rotate-left"></i> 取消</button>
            </div>
        </div>
    </form>
</div>